/**
 * @author : Mr.Yan
 * @create : 2019/5/21
 * @description : 业务相关的js 发送请求的
 */

/**
 * @Author : Mr.Yan
 * @create : 2019/4/17
 * @description : 根据身份证号获取出生日期和年龄和性别
 */
function setBirthdayAndSexAndAge(idCard, sexId, sexNameId, birthdayId, ageId, cardId) {
    $("#" + sexId).val(""); // 性别
    $("#" + sexNameId).val(""); // 性别
    $("#" + birthdayId).val(""); // 出生日期
    $("#" + ageId).val(""); // 年龄
    if (!isEmpty(idCard)) {
        if (validateIdCard(idCard)) {
            /** 验证身份证是否已创建档案*/
            verifyArchivesByCertificateId();
        } else {
            layTool.shoVerifyMsg("身份证号不正确!");
            $("#" + cardId).focus();
            $("#" + cardId).addClass("layui-form-danger");
            $(".form_buttom").css("display", "none");
        }
    }
    else {
        layTool.shoVerifyMsg("请填写身份证号!");
        $("#" + cardId).focus();
        $("#" + cardId).addClass("layui-form-danger");
        $(".form_buttom").css("display", "none");
    }

    /** 根据身份证号 验证 是否 创建了档案 返回 0 ： 此身份证号档案未存在 ，101 ： 此身份证号档案已存在 ，404 ： 出现未知异常*/
    function verifyArchivesByCertificateId() {
        var Url = prefixCommon + "/verifyArchivesByCertificateId"
            , JsonData = {
            "isValid": "1",
            "certificateId": idCard
        }
            , LodingFun = null
            , ReturnFun = function (data) {
            var info = getBirthdayAndSexAndAge(idCard);
            data.code == 0 ? (
                $(".form_buttom").css("display", "block"),
                    $("#" + sexId).val(info.sexId), // 性别
                    $("#" + sexNameId).val(info.sexName),// 性别
                    $("#" + birthdayId).val(info.birthDay), // 出生日期
                    $("#" + ageId).val(info.age), // 年龄
                    $("#" + cardId).removeClass("layui-form-danger")
            ) : ($(".form_buttom").css("display", "none"), layTool.shoVerifyMsg(data.msg), $("#" + cardId).val(''), $("#" + cardId).focus(), $("#" + cardId).addClass("layui-form-danger"));
        };
        AjaxAction.postData(Url, JsonData, LodingFun, ReturnFun);

    }
}


/**
 * @author : Mr.Yan
 * @create : 2019/5/21
 * @description : 创建档案 添加行操作
 */

var business = {
    jsbOption:
        "<div class=\"layui-inline\">\n" +
        "     <label class=\"layui-form-label\">精神病类型:</label>\n" +
        "     <div class=\"layui-input-block\">\n" +
        "         <select class=\"psychosisType\" lay-verify=\"required\">\n" +
        "               <option value=\"1\">精神分裂症</option>\n" +
        "               <option value=\"2\">分裂情感性障碍</option>\n" +
        "               <option value=\"3\">偏执型精神病</option>\n" +
        "               <option value=\"4\">双向情感障碍</option>\n" +
        "               <option value=\"5\">癫痫所致精神障碍</option>\n" +
        "               <option value=\"6\">精神发育迟滞伴发</option>\n" +
        "               <option value=\"7\">精神障碍</option>\n" +
        "               <option value=\"8\">其他</option>\n" +
        "        </select>" +
        "     </div>\n" +
        "</div>\n",

    zybOption:
        "<div class=\"layui-inline\">\n" +
        "     <label class=\"layui-form-label\">职业病名称:</label>\n" +
        "     <div class=\"layui-input-block\">\n" +
        "         <input type=\"text\" lay-verify=\"required\" class=\"layui-input jobName\" placeholder=\"请输入\">\n" +
        "     </div>\n" +
        "</div>\n",

    exOption:
        "<div class=\"layui-inline\">\n" +
        "     <label class=\"layui-form-label\">恶性肿瘤名称:</label>\n" +
        "     <div class=\"layui-input-block\">\n" +
        "         <input type=\"text\" lay-verify=\"required\" class=\"layui-input tumourName\" placeholder=\"请输入\">\n" +
        "     </div>\n" +
        "</div>\n",
    qtOption:
        "<div class=\"layui-inline\">\n" +
        "     <label class=\"layui-form-label\">其他病名称:</label>\n" +
        "     <div class=\"layui-input-block\">\n" +
        "         <input type=\"text\" lay-verify=\"required\" class=\"layui-input otherName\" placeholder=\"请输入\">\n" +
        "     </div>\n" +
        "</div>\n",
    diseaseAdd: function (rowId) {
        var num = Number($("" + rowId + " .rowAdd").length == 0 ? 0 : $("" + rowId + " .rowAdd")[$("" + rowId + " .rowAdd").length - 1].getAttribute("data-index")) + Number(1);
        var diseaseAddId = "diseaseAddId" + num;
        var optionHtml =
            "<div class=\"layui-row rowAdd\" id=" + diseaseAddId + " data-index=\"" + num + "\">\n" +
            "    <div class='layui-col-md1 layui-col-lg1 layui-col-lgT1 layui-col-lgb1'>" +
            "        <span class=\"layui-badge  layui-bg-blue\">"+num+"</span>"+
            "   </div>"+
            "    <div class=\"layui-col-md6 layui-col-lg5 layui-col-lgT3 layui-col-lgb4\">\n" +
            "        <div class=\"layui-inline\">\n" +
            "            <label class=\"layui-form-label\">疾病名称:</label>\n" +
            "            <div class=\"layui-input-block\">\n" +
            "                <select class=\"diseaseName\" lay-verify=\"required\" id=\"disease" + diseaseAddId + "\" lay-filter=\"disease" + diseaseAddId + "\">\n" +
            "                    <option value=\"2\">高血压</option>\n" +
            "                    <option value=\"3\">糖尿病</option>\n" +
            "                    <option value=\"4\">冠心病</option>\n" +
            "                    <option value=\"5\">慢性阻塞性肺疾病</option>\n" +
            "                    <option value=\"6\">恶性肿瘤</option>\n" +
            "                    <option value=\"7\">脑卒中</option>\n" +
            "                    <option value=\"8\">严重精神障碍</option>\n" +
            "                    <option value=\"9\">结核病</option>\n" +
            "                    <option value=\"10\">肝炎</option>\n" +
            "                    <option value=\"11\">其他法定传染病</option>\n" +
            "                    <option value=\"12\">职业病</option>\n" +
            "                    <option value=\"13\">其他</option>\n" +
            "                </select>\n" +
            "            </div>\n" +
            "        </div>\n" +
            "    </div>\n" +
            "    <div class=\"layui-col-md6 layui-col-lg5 layui-col-lgT3 layui-col-lgb4\" id=\"other" + diseaseAddId + "\">\n" +
            "    </div>\n" +
            "    <div class=\"layui-col-md6 layui-col-lg5 layui-col-lgT3 layui-col-lgb4\">\n" +
            "        <div class=\"layui-inline\">\n" +
            "            <label class=\"layui-form-label\">确诊时间:</label>\n" +
            "            <div class=\"layui-input-block\">\n" +
            "                <input type=\"text\" lay-verify=\"required\"  id=\"month" + diseaseAddId + "\" class=\"layui-input diagnosisDate\" readonly placeholder=\"选择日期\">\n" +
            "            </div>\n" +
            "        </div>\n" +
            "    </div>\n" +
            "    <div class=\"layui-col-md1 layui-col-lg1 layui-col-lgT1 layui-col-lgb1\">\n" +
            "        <div class=\"layui-inline\">\n" +
            "            <div class=\"layui-input-block\" style='margin: 0px'>\n" +
            "                <a class=\"layui-btn layui-btn-sm layui-btn-normal\" onclick=\"javaScript:business.removeThis('" + rowId + "','" + diseaseAddId + "')\"><i class=\"fa fa-lg fa-trash\"></i>删除</a>\n" +
            "            </div>\n" +
            "        </div>\n" +
            "    </div>\n" +
            "<hr>" +
            "</div>" ;

        $(rowId).append(optionHtml);
        renderForm();

        layui.use(['form', 'laydate'], function () {
            var laydate = layui.laydate
                , form = layui.form;
            laydate.render({
                elem: "#month" + diseaseAddId,
                max: 'NOWDAY'
            });
            /** 监听下拉操作*/
            form.on("select(disease" + diseaseAddId + ")", function (obj) {
                $(rowId + " #" + diseaseAddId + " #other" + diseaseAddId).html("");
                if (obj.value == "8") {
                    $(rowId + " #" + diseaseAddId + " #other" + diseaseAddId).append(business.jsbOption);
                } else if (obj.value == "12") {
                    $(rowId + " #" + diseaseAddId + " #other" + diseaseAddId).append(business.zybOption);
                } else if (obj.value == "6") {
                    $(rowId + " #" + diseaseAddId + " #other" + diseaseAddId).append(business.exOption);
                } else if (obj.value == "13") {
                    $(rowId + " #" + diseaseAddId + " #other" + diseaseAddId).append(business.qtOption);
                }
                renderForm();
            });

        });

        return $(optionHtml);
    },

    /** 添加手术*/
    surgeryAdd: function (rowId) {
        var num = Number($("" + rowId + " .rowAdd").length == 0 ? 0 : $("" + rowId + " .rowAdd")[$("" + rowId + " .rowAdd").length - 1].getAttribute("data-index")) + Number(1);
        var addId = "surgeryAddId" + num;
        var optionHtml =
            "<div class=\"layui-row rowAdd\" id=" + addId + " data-index=\"" + num + "\">\n" +
            "    <div class='layui-col-md1 layui-col-lg1 layui-col-lgT1 layui-col-lgb1'>" +
            "        <span class=\"layui-badge  layui-bg-blue\">"+num+"</span>"+
            "   </div>"+
            "    <div class=\"layui-col-md6 layui-col-lg5 layui-col-lgT3 layui-col-lgb4\">\n" +
            "        <div class=\"layui-inline\">\n" +
            "            <label class=\"layui-form-label\">手术名称:</label>\n" +
            "            <div class=\"layui-input-block\">\n" +
            "              <input class='layui-input surgeryName' lay-verify=\"required\" placeholder='请输入'>" +
            "            </div>\n" +
            "        </div>\n" +
            "    </div>\n" +
            "    <div class=\"layui-col-md6 layui-col-lg5 layui-col-lgT3 layui-col-lgb4\">\n" +
            "        <div class=\"layui-inline\">\n" +
            "            <label class=\"layui-form-label\">手术时间:</label>\n" +
            "            <div class=\"layui-input-block\">\n" +
            "                <input type=\"text\" id=\"month" + addId + "\" class=\"layui-input surgeryDate\" lay-verify=\"required\" readonly placeholder=\"选择日期\">\n" +
            "            </div>\n" +
            "        </div>\n" +
            "    </div>\n" +
            "    <div class=\"layui-col-md1 layui-col-lg1 layui-col-lgT1 layui-col-lgb1\">\n" +
            "        <div class=\"layui-inline\">\n" +
            "            <div class=\"layui-input-block\" style='margin: 0px'>\n" +
            "                <a class=\"layui-btn layui-btn-sm layui-btn-normal\" onclick=\"javaScript:business.removeThis('" + rowId + "','" + addId + "')\"><i class=\"fa fa-lg fa-trash\"></i>删除</a>\n" +
            "            </div>\n" +
            "        </div>\n" +
            "    </div>\n" +
            "<hr>" +
            "</div>" ;

        $(rowId).append(optionHtml);
        renderForm();

        layui.use(['form', 'laydate'], function () {
            var laydate = layui.laydate
                , form = layui.form;
            laydate.render({
                elem: "#month" + addId,
                max: 'NOWDAY'
            });
        });
        return $(optionHtml);
    },

    /** 添加外伤*/
    traumaAdd: function (rowId) {
        var num = Number($("" + rowId + " .rowAdd").length == 0 ? 0 : $("" + rowId + " .rowAdd")[$("" + rowId + " .rowAdd").length - 1].getAttribute("data-index")) + Number(1);
        var addId = "traumaAddId" + num;
        var optionHtml =
            "<div class=\"layui-row rowAdd\" id=" + addId + " data-index=\"" + num + "\">\n" +
            "    <div class='layui-col-md1 layui-col-lg1 layui-col-lgT1 layui-col-lgb1'>" +
            "        <span class=\"layui-badge  layui-bg-blue\">"+num+"</span>"+
            "   </div>"+
            "    <div class=\"layui-col-md6 layui-col-lg5 layui-col-lgT3 layui-col-lgb4\">\n" +
            "        <div class=\"layui-inline\">\n" +
            "            <label class=\"layui-form-label\">外伤名称:</label>\n" +
            "            <div class=\"layui-input-block\">\n" +
            "              <input class='layui-input trunmaName' lay-verify=\"required\" placeholder='请输入'>" +
            "            </div>\n" +
            "        </div>\n" +
            "    </div>\n" +
            "    <div class=\"layui-col-md6 layui-col-lg5 layui-col-lgT3 layui-col-lgb4\">\n" +
            "        <div class=\"layui-inline\">\n" +
            "            <label class=\"layui-form-label\">确诊时间:</label>\n" +
            "            <div class=\"layui-input-block\">\n" +
            "                <input type=\"text\" id=\"month" + addId + "\" lay-verify=\"required\" class=\"layui-input trunmaDate\" readonly placeholder=\"选择日期\">\n" +
            "            </div>\n" +
            "        </div>\n" +
            "    </div>\n" +
            "    <div class=\"layui-col-md1 layui-col-lg1 layui-col-lgT1 layui-col-lgb1\">\n" +
            "        <div class=\"layui-inline\">\n" +
            "            <div class=\"layui-input-block\" style='margin: 0px'>\n" +
            "                <a class=\"layui-btn layui-btn-sm layui-btn-normal\" onclick=\"javaScript:business.removeThis('" + rowId + "','" + addId + "')\"><i class=\"fa fa-lg fa-trash\"></i>删除</a>\n" +
            "            </div>\n" +
            "        </div>\n" +
            "    </div>\n" +
            "<hr>" +
            "</div>" ;

        $(rowId).append(optionHtml);
        renderForm();

        layui.use(['form', 'laydate'], function () {
            var laydate = layui.laydate
                , form = layui.form;
            laydate.render({
                elem: "#month" + addId,
                max: 'NOWDAY'
            });
        });
        return $(optionHtml);
    },
    /** 添加输血*/
    infusionAdd: function (rowId) {
        var num = Number($("" + rowId + " .rowAdd").length == 0 ? 0 : $("" + rowId + " .rowAdd")[$("" + rowId + " .rowAdd").length - 1].getAttribute("data-index")) + Number(1);
        var addId = "infusionAddId" + num;
        var optionHtml =
            "<div class=\"layui-row rowAdd\" id=" + addId + " data-index=\"" + num + "\">\n" +
            "    <div class='layui-col-md1 layui-col-lg1 layui-col-lgT1 layui-col-lgb1'>" +
            "        <span class=\"layui-badge  layui-bg-blue\">"+num+"</span>"+
            "   </div>"+
            "    <div class=\"layui-col-md6 layui-col-lg5 layui-col-lgT3 layui-col-lgb4\">\n" +
            "        <div class=\"layui-inline\">\n" +
            "            <label class=\"layui-form-label\">输血原因:</label>\n" +
            "            <div class=\"layui-input-block\">\n" +
            "              <input class='layui-input infusionName' lay-verify=\"required\" placeholder='请输入'>" +
            "            </div>\n" +
            "        </div>\n" +
            "    </div>\n" +
            "    <div class=\"layui-col-md6 layui-col-lg5 layui-col-lgT3 layui-col-lgb4\">\n" +
            "        <div class=\"layui-inline\">\n" +
            "            <label class=\"layui-form-label\">输血时间:</label>\n" +
            "            <div class=\"layui-input-block\">\n" +
            "                <input type=\"text\" id=\"month" + addId + "\" lay-verify=\"required\" class=\"layui-input infusionDate\" readonly placeholder=\"选择日期\">\n" +
            "            </div>\n" +
            "        </div>\n" +
            "    </div>\n" +
            "    <div class=\"layui-col-md1 layui-col-lg1 layui-col-lgT1 layui-col-lgb1\">\n" +
            "        <div class=\"layui-inline\">\n" +
            "            <div class=\"layui-input-block\" style='margin: 0px'>\n" +
            "                <a class=\"layui-btn layui-btn-sm layui-btn-normal\" onclick=\"javaScript:business.removeThis('" + rowId + "','" + addId + "')\"><i class=\"fa fa-lg fa-trash\"></i>删除</a>\n" +
            "            </div>\n" +
            "        </div>\n" +
            "    </div>\n" +
            "<hr>" +
            "</div>" ;

        $(rowId).append(optionHtml);
        renderForm();

        layui.use(['form', 'laydate'], function () {
            var laydate = layui.laydate
                , form = layui.form;
            laydate.render({
                elem: "#month" + addId,
                max: 'NOWDAY'
            });
        });
        return $(optionHtml);
    },

    /** 删除当前行*/
    removeThis: function (rowId, thisId) {
        $("" + rowId + " #" + thisId + "").remove();
    },

    /** 获取添加的数据*/
    getDiseaseData: function (rowId) {
        var data = [];
        var child = $("" + rowId + " .rowAdd");
        for (var i = 0; i < child.length; i++) {
            var jobName = null, tumourName = null, otherName = null, diagnosisDate = null, psychosisTypeId = null,
                psychosisTypeName = null;

            var diseaseCode = $(child[i]).find(".diseaseName").val(); // 获取疾病名称代码
            var diseaseName = $(child[i]).find(".diseaseName").find("option[value='" + diseaseCode + "']").text(); // 获取疾病名称
            if (diseaseCode == "8") {
                psychosisTypeId = $(child[i]).find(".psychosisType").val(); // 获取精神病名称
                psychosisTypeName = $(child[i]).find(".psychosisType option:selected").text(); // 获取精神病名称
            } else if (diseaseCode == "12") {
                jobName = $(child[i]).find(".jobName").val().trim(); // 职业病名称
            } else if (diseaseCode == "6") {
                tumourName = $(child[i]).find(".tumourName").val().trim(); // 恶性肿瘤病名称
            } else if (diseaseCode == "13") {
                otherName = $(child[i]).find(".otherName").val().trim(); // 其他病名称
            }
            diagnosisDate = $(child[i]).find(".diagnosisDate").val(); // 确诊日期

            data[i] = {
                diseaseId: diseaseCode, //  获取疾病名称代码
                diseaseName: diseaseName,// 获取疾病名称
                psychosisTypeId: psychosisTypeId,// 获取精神病名称
                psychosisTypeName: psychosisTypeName,// 获取精神病名称
                jobName: jobName,// 职业病名称
                tumourName: tumourName,// 恶性肿瘤病名称
                otherName: otherName,// 其他病名称
                diagnosisDate: diagnosisDate, //确诊日期
            }
        }
        return data;
    },
    /** 获取手术的添加数据*/
    getSurgeryData: function (rowId) {
        var data = [];
        var child = $("" + rowId + " .rowAdd");
        for (var i = 0; i < child.length; i++) {
            var surgeryName = null, surgeryDate = null;

            surgeryName = $(child[i]).find(".surgeryName").val().trim(); // 获取疾病名称代码
            surgeryDate = $(child[i]).find(".surgeryDate").val(); // 确诊日期

            data[i] = {
                opsName: surgeryName, // 手术名称
                opsDate: surgeryDate, // 手术时间
            }
        }
        return data;
    },
    /** 获取外伤的添加数据*/
    getTraumaData: function (rowId) {
        var data = [];
        var child = $("" + rowId + " .rowAdd");
        for (var i = 0; i < child.length; i++) {
            var trunmaName = null, trunmaDate = null;

            trunmaName = $(child[i]).find(".trunmaName").val().trim(); // 获取疾病名称代码
            trunmaDate = $(child[i]).find(".trunmaDate").val(); // 确诊日期

            data[i] = {
                trunmaName: trunmaName, // 外伤名称
                trunmaDate: trunmaDate, // 外伤时间
            }
        }
        return data;
    },
    /** 获取输血的添加数据*/
    getInfusionData: function (rowId) {
        var data = [];
        var child = $("" + rowId + " .rowAdd");
        for (var i = 0; i < child.length; i++) {
            var infusionName = null, infusionDate = null;

            infusionName = $(child[i]).find(".infusionName").val().trim(); // 获取疾病名称代码
            infusionDate = $(child[i]).find(".infusionDate").val(); // 确诊日期

            data[i] = {
                bloodtranCause: infusionName, // 输血原因
                bloodtranDate: infusionDate, // 输血时间
            }
        }
        return data;
    },
    /** 设置疾病数据回显*/
    setDiseaseData: function (rowId, personArchivesDiseaseBeanList) {
        personArchivesDiseaseBeanList.forEach(function (personArchivesDiseaseBean){
            var rowDiv = business.diseaseAdd(rowId),
                lineId = rowDiv.attr("id");
            $(rowId + " #" + lineId + " .diseaseName").val(personArchivesDiseaseBean.diseaseId); // 疾病类型
            $(rowId + " #" + lineId + " .diagnosisDate").val(personArchivesDiseaseBean.diagnosisDate); // 确诊日期
            /** 8： 精神病 12：  职业病 6： 恶性肿瘤 13 :其他*/
            if (personArchivesDiseaseBean.diseaseId == "8") {
                $(rowId + " #" + lineId + " #other" + lineId).append(business.jsbOption);
                $(rowId + " #" + lineId + " #other" + lineId + " .psychosisType").val(personArchivesDiseaseBean.psychosisTypeId);
            } else if (personArchivesDiseaseBean.diseaseId == "12") {
                $(rowId + " #" + lineId + " #other" + lineId).append(business.zybOption);
                $(rowId + " #" + lineId + " #other" + lineId + " .jobName").val(personArchivesDiseaseBean.jobName);
            } else if (personArchivesDiseaseBean.diseaseId == "6") {
                $(rowId + " #" + lineId + " #other" + lineId).append(business.exOption);
                $(rowId + " #" + lineId + " #other" + lineId + " .tumourName").val(personArchivesDiseaseBean.tumourName);
            } else if (personArchivesDiseaseBean.diseaseId == "13") {
                $(rowId + " #" + lineId + " #other" + lineId).append(business.qtOption);
                $(rowId + " #" + lineId + " #other" + lineId + " .otherName").val(personArchivesDiseaseBean.otherName);
            }
            renderForm();
        });
    },
    /** 设置手术数据回显*/
    setSurgeryData: function (rowId, personArchivesSurgeryBeanList) {
        personArchivesSurgeryBeanList.forEach(function (personArchivesSurgeryBean) {
            var rowDiv = business.surgeryAdd(rowId),
                lineId = rowDiv.attr("id");
            $(rowId + " #" + lineId + " .surgeryName").val(personArchivesSurgeryBean.opsName); // 手术名称
            $(rowId + " #" + lineId + " .surgeryDate").val(personArchivesSurgeryBean.opsDate); // 确诊日期
            renderForm();
        });
    },
    /** 设置外伤数据回显*/
    setTraumaData: function (rowId, personArchivesTraumaBeanList) {
        personArchivesTraumaBeanList.forEach(function (personArchivesTraumaBean) {
            var rowDiv = business.traumaAdd(rowId),
                lineId = rowDiv.attr("id");
            $(rowId + " #" + lineId + " .trunmaName").val(personArchivesTraumaBean.trunmaName); // 外伤名称
            $(rowId + " #" + lineId + " .trunmaDate").val(personArchivesTraumaBean.trunmaDate); // 确诊日期
            renderForm();
        });
    },
    /** 设置输血数据回显*/
    setInfusionData: function (rowId, personArchivesInfusionBeanList) {
        personArchivesInfusionBeanList.forEach(function (personArchivesInfusionBean){
            var rowDiv = business.infusionAdd(rowId),
                lineId = rowDiv.attr("id");
            $(rowId + " #" + lineId + " .infusionName").val(personArchivesInfusionBean.bloodtranCause); // 输血原因
            $(rowId + " #" + lineId + " .infusionDate").val(personArchivesInfusionBean.bloodtranDate); // 确诊日期
            renderForm();
        });
    },

    /** 设置移动端 高血压列表*/
    setHypertensionData : function (hypertensionBean) {
        let num = Number($("#tb .layui-colla-itemClass").length == 0 ? 0 : $("#tb .layui-colla-itemClass")[$("#tb .layui-colla-itemClass").length - 1].getAttribute("data-index")) + Number(1);
        let itemId = "layui-colla-item-Id" + num;
        let liHtml = "<div class=\"layui-colla-item layui-colla-itemClass\" id=\""+ itemId+"\" data-index=\""+ num +"\">\n" +
            "                <span class=\"layui-badge layui-bg-blue layui-numbers\">"+num+"</span>\n" +
            "                <h2 class=\"layui-colla-title\">\n" +
            "                    <div class=\"layui-col-xs4 layui-col-sm4\" style='min-width: 115px'>\n" +
            "                        " + hypertensionBean.archiveId + "\n" +
            "                    </div>\n" +
            "                    <div class=\"layui-col-xs2 layui-col-sm2\">\n" +
            "                        " + hypertensionBean.name + "\n" +
            "                    </div>\n" +
            "                    <div class=\"layui-col-xs2 layui-col-sm2\">\n" +
            "                        " + hypertensionBean.genderName + "\n" +
            "                    </div>\n" +
            "                    <div class=\"layui-col-xs2 layui-col-sm2\">\n" +
            "                        " + hypertensionBean.age + " 岁\n" +
            "                    </div>\n" +
            "                </h2>\n" +
            "                <div class=\"layui-colla-content\">\n" +
            "                    <div class=\"layui-row\">\n" +
            "                        <div class=\"layui-col-xs12 layui-col-sm12\">\n" +
            "                            档案号: " + hypertensionBean.archiveId + "\n" +
            "                        </div>\n" +
            "                    </div>\n" +
            "                    <div class=\"layui-row\">\n" +
            "                        <div class=\"layui-col-xs12 layui-col-sm12\">\n" +
            "                            身份证号: " + hypertensionBean.certificateId + "\n" +
            "                        </div>\n" +
            "                    </div>\n" +
            "                    <div class=\"layui-row\">\n" +
            "                        <div class=\"layui-col-xs6 layui-col-sm6\">\n" +
            "                            姓名: " + (isEmpty(hypertensionBean.name) ? "" : (hypertensionBean.name)) + "\n" +
            "                        </div>\n" +
            "                        <div class=\"layui-col-xs6 layui-col-sm6\">\n" +
            "                            年龄:  " + (isEmpty(hypertensionBean.age) ? "" : (hypertensionBean.age)) + "岁\n" +
            "                        </div>\n" +
            "                    </div>\n" +
            "                    <div class=\"layui-row\">\n" +
            "                        <div class=\"layui-col-xs6 layui-col-sm6\">\n" +
            "                            性别: " + (isEmpty(hypertensionBean.genderName) ? "" : (hypertensionBean.genderName)) + "\n" +
            "                        </div>\n" +
            "                        <div class=\"layui-col-xs6 layui-col-sm6\">\n" +
            "                            出生日期:  " + (isEmpty(hypertensionBean.birthday) ? "" : (hypertensionBean.birthday)) + "\n" +
            "                        </div>\n" +
            "                    </div>\n" +
            "                    <div class=\"layui-row\">\n" +
            "                        <div class=\"layui-col-xs6 layui-col-sm6\">\n" +
            "                            管理状态: " + (isEmpty(hypertensionBean.adminStatusName) ? "" : (hypertensionBean.adminStatusName)) + "\n" +
            "                        </div>\n" +
            "                        <div class=\"layui-col-xs6 layui-col-sm6\">\n" +
            "                            手机号:  " + (isEmpty(hypertensionBean.telephone) ? "" : (hypertensionBean.telephone)) + "\n" +
            "                        </div>\n" +
            "                    </div>\n" +
            "                    <div class=\"layui-row\">\n" +
            "                        <div class=\"layui-col-xs12 layui-col-sm12\">\n" +
            "                            现居地址: " + (isEmpty(hypertensionBean.nowAddrName) ? "" : (hypertensionBean.nowAddrName)) + "\n" +
            "                        </div>\n" +
            "                    </div>\n" +
            "                    <div class=\"layui-row\">\n" +
            "                        <div class=\"layui-col-xs12 layui-col-sm12\">\n" +
            "                            现居详细地址: " + (isEmpty(hypertensionBean.nowAddrDetail) ? "" : (hypertensionBean.nowAddrDetail)) + "\n" +
            "                        </div>\n" +
            "                    </div>\n" +
            "                    <div class=\"layui-row\">\n" +
            "                        <div class=\"layui-col-xs6 layui-col-sm6\">\n" +
            "                            随访记录数: " + (isEmpty(hypertensionBean.examinationNum) ? "" : (hypertensionBean.examinationNum)) + "\n" +
            "                        </div>\n" +
            "                        <div class=\"layui-col-xs6 layui-col-sm6\">\n" +
            "                            最近随访日期:  " + (isEmpty(hypertensionBean.visitDate) ? "" : (hypertensionBean.visitDate)) + "\n" +
            "                        </div>\n" +
            "                    </div>\n" +
            "                    <div class=\"layui-row\">\n" +
            "                        <div class=\"layui-col-xs6 layui-col-sm6\">\n" +
            "                            下次随访日期: " + (isEmpty(hypertensionBean.nextVisitDate) ? "" : (hypertensionBean.nextVisitDate)) + "\n" +
            "                        </div>\n" +
            "                        <div class=\"layui-col-xs6 layui-col-sm6\">\n" +
            "                            责任医生:  " + (isEmpty(hypertensionBean.responsibleDoctor) ? "" : (hypertensionBean.responsibleDoctor)) + "\n" +
            "                        </div>\n" +
            "                    </div>\n" +
            "                    <div class=\"layui-row\">\n" +
            "                        <div class=\"layui-col-xs6 layui-col-sm6 layui-col-xs-offset6 layui-col-sm-offset6\">\n" +
            "                             <a class=\"layui-btn layui-btn-normal  layui-btn-sm\"onclick=business.openIframe('"+prefixOpen+"/webMobile!chronicDiseaseMGT!hypertensionMGT!operation!hypertensionOption@archiveId="+hypertensionBean.archiveId+"&name="+hypertensionBean.name+"&certificateId="+hypertensionBean.certificateId+"') title=\"添加随访\"><i class=\"fa fa-plus-circle fa-lg\" aria-hidden=\"true\"></i>添加随访</a>\n" +
            "                        </div>\n" +
            "                    </div>\n" +
            "                </div>\n" +
            "            </div>";
        return liHtml;
    }

    /** 设置糖尿病随访 */
    ,setDiabetesData : function (diabetesVisitBean) {
        let num = Number($("#tb .layui-colla-itemClass").length == 0 ? 0 : $("#tb .layui-colla-itemClass")[$("#tb .layui-colla-itemClass").length - 1].getAttribute("data-index")) + Number(1);
        let itemId = "layui-colla-item-Id" + num;
        let liHtml = "<div class=\"layui-colla-item layui-colla-itemClass\" id=\""+ itemId+"\" data-index=\""+ num +"\">\n" +
            "                <span class=\"layui-badge layui-bg-blue layui-numbers\">"+num+"</span>\n" +
            "                <h2 class=\"layui-colla-title\">\n" +
            "                    <div class=\"layui-col-xs4 layui-col-sm4\" style='min-width: 115px'>\n" +
            "                        " + diabetesVisitBean.archiveId + "\n" +
            "                    </div>\n" +
            "                    <div class=\"layui-col-xs2 layui-col-sm2\">\n" +
            "                        " + diabetesVisitBean.name + "\n" +
            "                    </div>\n" +
            "                    <div class=\"layui-col-xs2 layui-col-sm2\">\n" +
            "                        " + diabetesVisitBean.genderName + "\n" +
            "                    </div>\n" +
            "                    <div class=\"layui-col-xs2 layui-col-sm2\">\n" +
            "                        " + diabetesVisitBean.age + " 岁\n" +
            "                    </div>\n" +
            "                </h2>\n" +
            "                <div class=\"layui-colla-content\">\n" +
            "                    <div class=\"layui-row\">\n" +
            "                        <div class=\"layui-col-xs12 layui-col-sm12\">\n" +
            "                            档案号: " + diabetesVisitBean.archiveId + "\n" +
            "                        </div>\n" +
            "                    </div>\n" +
            "                    <div class=\"layui-row\">\n" +
            "                        <div class=\"layui-col-xs12 layui-col-sm12\">\n" +
            "                            身份证号: " + diabetesVisitBean.certificateId + "\n" +
            "                        </div>\n" +
            "                    </div>\n" +
            "                    <div class=\"layui-row\">\n" +
            "                        <div class=\"layui-col-xs6 layui-col-sm6\">\n" +
            "                            姓名: " + (isEmpty(diabetesVisitBean.name) ? "" : (diabetesVisitBean.name)) + "\n" +
            "                        </div>\n" +
            "                        <div class=\"layui-col-xs6 layui-col-sm6\">\n" +
            "                            年龄:  " + (isEmpty(diabetesVisitBean.age) ? "" : (diabetesVisitBean.age)) + "岁\n" +
            "                        </div>\n" +
            "                    </div>\n" +
            "                    <div class=\"layui-row\">\n" +
            "                        <div class=\"layui-col-xs6 layui-col-sm6\">\n" +
            "                            性别: " + (isEmpty(diabetesVisitBean.genderName) ? "" : (diabetesVisitBean.genderName)) + "\n" +
            "                        </div>\n" +
            "                        <div class=\"layui-col-xs6 layui-col-sm6\">\n" +
            "                            出生日期:  " + (isEmpty(diabetesVisitBean.birthday) ? "" : (diabetesVisitBean.birthday)) + "\n" +
            "                        </div>\n" +
            "                    </div>\n" +
            "                    <div class=\"layui-row\">\n" +
            "                        <div class=\"layui-col-xs6 layui-col-sm6\">\n" +
            "                            管理状态: " + (isEmpty(diabetesVisitBean.adminStatusName) ? "" : (diabetesVisitBean.adminStatusName)) + "\n" +
            "                        </div>\n" +
            "                        <div class=\"layui-col-xs6 layui-col-sm6\">\n" +
            "                            手机号:  " + (isEmpty(diabetesVisitBean.telephone) ? "" : (diabetesVisitBean.telephone)) + "\n" +
            "                        </div>\n" +
            "                    </div>\n" +
            "                    <div class=\"layui-row\">\n" +
            "                        <div class=\"layui-col-xs12 layui-col-sm12\">\n" +
            "                            现居地址: " + (isEmpty(diabetesVisitBean.nowAddrName) ? "" : (diabetesVisitBean.nowAddrName)) + "\n" +
            "                        </div>\n" +
            "                    </div>\n" +
            "                    <div class=\"layui-row\">\n" +
            "                        <div class=\"layui-col-xs12 layui-col-sm12\">\n" +
            "                            现居详细地址: " + (isEmpty(diabetesVisitBean.nowAddrDetail) ? "" : (diabetesVisitBean.nowAddrDetail)) + "\n" +
            "                        </div>\n" +
            "                    </div>\n" +
            "                    <div class=\"layui-row\">\n" +
            "                        <div class=\"layui-col-xs6 layui-col-sm6\">\n" +
            "                            随访记录数: " + (isEmpty(diabetesVisitBean.examinationNum) ? "" : (diabetesVisitBean.examinationNum)) + "\n" +
            "                        </div>\n" +
            "                        <div class=\"layui-col-xs6 layui-col-sm6\">\n" +
            "                            最近随访日期:  " + (isEmpty(diabetesVisitBean.visitDate) ? "" : (diabetesVisitBean.visitDate)) + "\n" +
            "                        </div>\n" +
            "                    </div>\n" +
            "                    <div class=\"layui-row\">\n" +
            "                        <div class=\"layui-col-xs6 layui-col-sm6\">\n" +
            "                            下次随访日期: " + (isEmpty(diabetesVisitBean.nextVisitDate) ? "" : (diabetesVisitBean.nextVisitDate)) + "\n" +
            "                        </div>\n" +
            "                        <div class=\"layui-col-xs6 layui-col-sm6\">\n" +
            "                            责任医生:  " + (isEmpty(diabetesVisitBean.responsibleDoctor) ? "" : (diabetesVisitBean.responsibleDoctor)) + "\n" +
            "                        </div>\n" +
            "                    </div>\n" +
            "                    <div class=\"layui-row\">\n" +
            "                        <div class=\"layui-col-xs6 layui-col-sm6 layui-col-xs-offset6 layui-col-sm-offset6\">\n" +
            "                             <a class=\"layui-btn layui-btn-normal  layui-btn-sm\" onclick=business.openIframe('"+   prefixOpen +"/webMobile!chronicDiseaseMGT!diabetesMGT!operation!diabetesOption@archiveId="+ diabetesVisitBean.archiveId +"&name="+diabetesVisitBean.name+"&certificateId="+  diabetesVisitBean.certificateId +"') title=\"添加随访\"><i class=\"fa fa-plus-circle fa-lg\" aria-hidden=\"true\"></i>添加随访</a>\n" +
            "                        </div>\n" +
            "                    </div>\n" +
            "                </div>\n" +
            "            </div>";
        return liHtml;
    }
    /** 打开移动端随访*/
    , openIframe:  function (url) {
        $("body").css("overflow","hidden");
        $("content").css("visibility","hidden");
        $("body .layui-fixbar").css("visibility","hidden");
        var iframeHtml = "<iframe  style=\"border:0;position: fixed !important;z-index: 1000001; top: 0 !important;left: 0 !important;width: 100% !important;height: 100% !important;\" align=\"top\" height=\"100%\" width=\"100%\" src=\""+ url +"\"></iframe>"
        var footHtml = "<a class=\"Navigation\"  id=\"goback\" onclick=\"business.goback()\">\n" +
            "        <i class=\"fa fa-reply\"></i>\n" +
            "        <span>返回</span>\n" +
            "    </a>";
         $("body").append(iframeHtml);
         $("body footer").append(footHtml);

    },
    /** 移动端随访关闭*/
    goback : function() {
        $("body").css("overflow","auto");
        $("content").css("visibility","");
        $("body .layui-fixbar").css("visibility","");
        $("body iframe").remove();
        $("body footer  #goback").remove();
    }

    /** 移动端 精神病列表选项卡 */
    ,setMentalIllnessData : function (mentalIllnessVisitBean) {
        let num = Number($("#tb .layui-colla-itemClass").length == 0 ? 0 : $("#tb .layui-colla-itemClass")[$("#tb .layui-colla-itemClass").length - 1].getAttribute("data-index")) + Number(1);
        let itemId = "layui-colla-item-Id" + num;
        let liHtml = "<div class=\"layui-colla-item layui-colla-itemClass\" id=\""+ itemId+"\" data-index=\""+ num +"\">\n" +
            "                <span class=\"layui-badge layui-bg-blue layui-numbers\">"+num+"</span>\n" +
            "                <h2 class=\"layui-colla-title\">\n" +
            "                    <div class=\"layui-col-xs4 layui-col-sm4\" style='min-width: 115px'>\n" +
            "                        " + mentalIllnessVisitBean.archiveId + "\n" +
            "                    </div>\n" +
            "                    <div class=\"layui-col-xs2 layui-col-sm2\">\n" +
            "                        " + mentalIllnessVisitBean.name + "\n" +
            "                    </div>\n" +
            "                    <div class=\"layui-col-xs2 layui-col-sm2\">\n" +
            "                        " + mentalIllnessVisitBean.genderName + "\n" +
            "                    </div>\n" +
            "                    <div class=\"layui-col-xs2 layui-col-sm2\">\n" +
            "                        " + mentalIllnessVisitBean.age + " 岁\n" +
            "                    </div>\n" +
            "                </h2>\n" +
            "                <div class=\"layui-colla-content\">\n" +
            "                    <div class=\"layui-row\">\n" +
            "                        <div class=\"layui-col-xs12 layui-col-sm12\">\n" +
            "                            档案号: " + mentalIllnessVisitBean.archiveId + "\n" +
            "                        </div>\n" +
            "                    </div>\n" +
            "                    <div class=\"layui-row\">\n" +
            "                        <div class=\"layui-col-xs12 layui-col-sm12\">\n" +
            "                            身份证号: " + mentalIllnessVisitBean.certificateId + "\n" +
            "                        </div>\n" +
            "                    </div>\n" +
            "                    <div class=\"layui-row\">\n" +
            "                        <div class=\"layui-col-xs6 layui-col-sm6\">\n" +
            "                            姓名: " + (isEmpty(mentalIllnessVisitBean.name) ? "" : (mentalIllnessVisitBean.name)) + "\n" +
            "                        </div>\n" +
            "                        <div class=\"layui-col-xs6 layui-col-sm6\">\n" +
            "                            年龄:  " + (isEmpty(mentalIllnessVisitBean.age) ? "" : (mentalIllnessVisitBean.age)) + "岁\n" +
            "                        </div>\n" +
            "                    </div>\n" +
            "                    <div class=\"layui-row\">\n" +
            "                        <div class=\"layui-col-xs6 layui-col-sm6\">\n" +
            "                            性别: " + (isEmpty(mentalIllnessVisitBean.genderName) ? "" : (mentalIllnessVisitBean.genderName)) + "\n" +
            "                        </div>\n" +
            "                        <div class=\"layui-col-xs6 layui-col-sm6\">\n" +
            "                            出生日期:  " + (isEmpty(mentalIllnessVisitBean.birthday) ? "" : (mentalIllnessVisitBean.birthday)) + "\n" +
            "                        </div>\n" +
            "                    </div>\n" +
            "                    <div class=\"layui-row\">\n" +
            "                        <div class=\"layui-col-xs6 layui-col-sm6\">\n" +
            "                            管理状态: " + (isEmpty(mentalIllnessVisitBean.adminStatusName) ? "" : (mentalIllnessVisitBean.adminStatusName)) + "\n" +
            "                        </div>\n" +
            "                        <div class=\"layui-col-xs6 layui-col-sm6\">\n" +
            "                            手机号:  " + (isEmpty(mentalIllnessVisitBean.telephone) ? "" : (mentalIllnessVisitBean.telephone)) + "\n" +
            "                        </div>\n" +
            "                    </div>\n" +
            "                    <div class=\"layui-row\">\n" +
            "                        <div class=\"layui-col-xs12 layui-col-sm12\">\n" +
            "                            现居地址: " + (isEmpty(mentalIllnessVisitBean.nowAddrName) ? "" : (mentalIllnessVisitBean.nowAddrName)) + "\n" +
            "                        </div>\n" +
            "                    </div>\n" +
            "                    <div class=\"layui-row\">\n" +
            "                        <div class=\"layui-col-xs12 layui-col-sm12\">\n" +
            "                            现居详细地址: " + (isEmpty(mentalIllnessVisitBean.nowAddrDetail) ? "" : (mentalIllnessVisitBean.nowAddrDetail)) + "\n" +
            "                        </div>\n" +
            "                    </div>\n" +
            "                    <div class=\"layui-row\">\n" +
            "                        <div class=\"layui-col-xs6 layui-col-sm6\">\n" +
            "                            随访记录数: " + (isEmpty(mentalIllnessVisitBean.examinationNum) ? "" : (mentalIllnessVisitBean.examinationNum)) + "\n" +
            "                        </div>\n" +
            "                        <div class=\"layui-col-xs6 layui-col-sm6\">\n" +
            "                            最近随访日期:  " + (isEmpty(mentalIllnessVisitBean.visitDate) ? "" : (mentalIllnessVisitBean.visitDate)) + "\n" +
            "                        </div>\n" +
            "                    </div>\n" +
            "                    <div class=\"layui-row\">\n" +
            "                        <div class=\"layui-col-xs6 layui-col-sm6\">\n" +
            "                            下次随访日期: " + (isEmpty(mentalIllnessVisitBean.nextVisitDate) ? "" : (mentalIllnessVisitBean.nextVisitDate)) + "\n" +
            "                        </div>\n" +
            "                        <div class=\"layui-col-xs6 layui-col-sm6\">\n" +
            "                            责任医生:  " + (isEmpty(mentalIllnessVisitBean.responsibleDoctor) ? "" : (mentalIllnessVisitBean.responsibleDoctor)) + "\n" +
            "                        </div>\n" +
            "                    </div>\n" +
            "                    <div class=\"layui-row\">\n" +
            "                        <div class=\"layui-col-xs6 layui-col-sm6 layui-col-xs-offset6 layui-col-sm-offset6\">\n" +
            "                             <a class=\"layui-btn layui-btn-normal  layui-btn-sm\" onclick=business.openIframe('"+prefixOpen+"/webMobile!chronicDiseaseMGT!mentalIllnessMGT!operation!mentalIllnessOption@archiveId="+mentalIllnessVisitBean.archiveId+"&name="+mentalIllnessVisitBean.name+"&certificateId="+mentalIllnessVisitBean.certificateId+"') title=\"添加随访\"><i class=\"fa fa-plus-circle fa-lg\" aria-hidden=\"true\"></i>添加随访</a>\n" +
            "                        </div>\n" +
            "                    </div>\n" +
            "                </div>\n" +
            "            </div>";
        return liHtml;
    }

    /** 移动端 结核病列表选项卡 */
    ,setTuberculosisData : function (tuberculosisVisitBean) {
        let num = Number($("#tb .layui-colla-itemClass").length == 0 ? 0 : $("#tb .layui-colla-itemClass")[$("#tb .layui-colla-itemClass").length - 1].getAttribute("data-index")) + Number(1);
        let itemId = "layui-colla-item-Id" + num;
        let liHtml = "<div class=\"layui-colla-item layui-colla-itemClass\" id=\""+ itemId+"\" data-index=\""+ num +"\">\n" +
            "                <span class=\"layui-badge layui-bg-blue layui-numbers\">"+num+"</span>\n" +
            "                <h2 class=\"layui-colla-title\">\n" +
            "                    <div class=\"layui-col-xs4 layui-col-sm4\" style='min-width: 115px'>\n" +
            "                        " + tuberculosisVisitBean.archiveId + "\n" +
            "                    </div>\n" +
            "                    <div class=\"layui-col-xs2 layui-col-sm2\">\n" +
            "                        " + tuberculosisVisitBean.name + "\n" +
            "                    </div>\n" +
            "                    <div class=\"layui-col-xs2 layui-col-sm2\">\n" +
            "                        " + tuberculosisVisitBean.genderName + "\n" +
            "                    </div>\n" +
            "                    <div class=\"layui-col-xs2 layui-col-sm2\">\n" +
            "                        " + tuberculosisVisitBean.age + " 岁\n" +
            "                    </div>\n" +
            "                </h2>\n" +
            "                <div class=\"layui-colla-content\">\n" +
            "                    <div class=\"layui-row\">\n" +
            "                        <div class=\"layui-col-xs12 layui-col-sm12\">\n" +
            "                            档案号: " + tuberculosisVisitBean.archiveId + "\n" +
            "                        </div>\n" +
            "                    </div>\n" +
            "                    <div class=\"layui-row\">\n" +
            "                        <div class=\"layui-col-xs12 layui-col-sm12\">\n" +
            "                            身份证号: " + tuberculosisVisitBean.certificateId + "\n" +
            "                        </div>\n" +
            "                    </div>\n" +
            "                    <div class=\"layui-row\">\n" +
            "                        <div class=\"layui-col-xs6 layui-col-sm6\">\n" +
            "                            姓名: " + (isEmpty(tuberculosisVisitBean.name) ? "" : (tuberculosisVisitBean.name)) + "\n" +
            "                        </div>\n" +
            "                        <div class=\"layui-col-xs6 layui-col-sm6\">\n" +
            "                            年龄:  " + (isEmpty(tuberculosisVisitBean.age) ? "" : (tuberculosisVisitBean.age)) + "岁\n" +
            "                        </div>\n" +
            "                    </div>\n" +
            "                    <div class=\"layui-row\">\n" +
            "                        <div class=\"layui-col-xs6 layui-col-sm6\">\n" +
            "                            性别: " + (isEmpty(tuberculosisVisitBean.genderName) ? "" : (tuberculosisVisitBean.genderName)) + "\n" +
            "                        </div>\n" +
            "                        <div class=\"layui-col-xs6 layui-col-sm6\">\n" +
            "                            出生日期:  " + (isEmpty(tuberculosisVisitBean.birthday) ? "" : (tuberculosisVisitBean.birthday)) + "\n" +
            "                        </div>\n" +
            "                    </div>\n" +
            "                    <div class=\"layui-row\">\n" +
            "                        <div class=\"layui-col-xs6 layui-col-sm6\">\n" +
            "                            管理状态: " + (isEmpty(tuberculosisVisitBean.adminStatusName) ? "" : (tuberculosisVisitBean.adminStatusName)) + "\n" +
            "                        </div>\n" +
            "                        <div class=\"layui-col-xs6 layui-col-sm6\">\n" +
            "                            手机号:  " + (isEmpty(tuberculosisVisitBean.telephone) ? "" : (tuberculosisVisitBean.telephone)) + "\n" +
            "                        </div>\n" +
            "                    </div>\n" +
            "                    <div class=\"layui-row\">\n" +
            "                        <div class=\"layui-col-xs12 layui-col-sm12\">\n" +
            "                            现居地址: " + (isEmpty(tuberculosisVisitBean.nowAddrName) ? "" : (tuberculosisVisitBean.nowAddrName)) + "\n" +
            "                        </div>\n" +
            "                    </div>\n" +
            "                    <div class=\"layui-row\">\n" +
            "                        <div class=\"layui-col-xs12 layui-col-sm12\">\n" +
            "                            现居详细地址: " + (isEmpty(tuberculosisVisitBean.nowAddrDetail) ? "" : (tuberculosisVisitBean.nowAddrDetail)) + "\n" +
            "                        </div>\n" +
            "                    </div>\n" +
            "                    <div class=\"layui-row\">\n" +
            "                        <div class=\"layui-col-xs6 layui-col-sm6\">\n" +
            "                            随访记录数: " + (isEmpty(tuberculosisVisitBean.examinationNum) ? "" : (tuberculosisVisitBean.examinationNum)) + "\n" +
            "                        </div>\n" +
            "                        <div class=\"layui-col-xs6 layui-col-sm6\">\n" +
            "                            最近随访日期:  " + (isEmpty(tuberculosisVisitBean.visitDate) ? "" : (tuberculosisVisitBean.visitDate)) + "\n" +
            "                        </div>\n" +
            "                    </div>\n" +
            "                    <div class=\"layui-row\">\n" +
            "                        <div class=\"layui-col-xs6 layui-col-sm6\">\n" +
            "                            下次随访日期: " + (isEmpty(tuberculosisVisitBean.nextVisitDate) ? "" : (tuberculosisVisitBean.nextVisitDate)) + "\n" +
            "                        </div>\n" +
            "                        <div class=\"layui-col-xs6 layui-col-sm6\">\n" +
            "                            责任医生:  " + (isEmpty(tuberculosisVisitBean.responsibleDoctor) ? "" : (tuberculosisVisitBean.responsibleDoctor)) + "\n" +
            "                        </div>\n" +
            "                    </div>\n";

              if(!tuberculosisVisitBean.examinationNum){
                  liHtml+="                    <div class=\"layui-row\">\n" +
                      "                        <div class=\"layui-col-xs6 layui-col-sm6 layui-col-xs-offset6 layui-col-sm-offset6\">\n" +
                      "                             <a class=\"layui-btn layui-btn-normal  layui-btn-sm\" onclick=business.openIframe('"+prefixOpen+"/webMobile!chronicDiseaseMGT!tuberculosisMGT!operation!tuberculosisOneOption@archiveId="+tuberculosisVisitBean.archiveId+"&name="+tuberculosisVisitBean.name+"&certificateId="+tuberculosisVisitBean.certificateId+"') title=\"添加第一次随访\"><i class=\"fa fa-plus-circle fa-lg\" aria-hidden=\"true\"></i>添加第一次随访</a>\n" +
                      "                        </div>\n" +
                      "                       </div>\n";
              }else {
                  liHtml+="                    <div class=\"layui-row\">\n" +
                      "                        <div class=\"layui-col-xs6 layui-col-sm6 layui-col-xs-offset6 layui-col-sm-offset6\">\n" +
                      "                             <a class=\"layui-btn layui-btn-normal  layui-btn-sm\" onclick=business.openIframe('"+prefixOpen+"/webMobile!chronicDiseaseMGT!tuberculosisMGT!operation!tuberculosisOption@archiveId="+tuberculosisVisitBean.archiveId+"&name="+tuberculosisVisitBean.name+"&certificateId="+tuberculosisVisitBean.certificateId+"') title=\"添加日常随访\"><i class=\"fa fa-plus-circle fa-lg\" aria-hidden=\"true\"></i>添加日常随访</a>\n" +
                      "                        </div>\n" +
                      "                    </div>\n";
              }

        liHtml+="                </div>\n" +
            "            </div>";
        return liHtml;
    }
};
